package com.fuershiye.woman.monitor.service;

import com.fuershiye.woman.monitor.beans.Page;
import com.fuershiye.woman.monitor.beans.ViewDepartIndicatorReport;
import com.fuershiye.woman.monitor.model.DepartIndicator;

import java.util.List;

/**
 * @author yongyongdong
 *
 * 唯一索引：departid, forms, indicator, year
 * 按年实现翻页
 *
 */
public interface DepartIndicatorService {

    DepartIndicator get(Long id);
    void save(DepartIndicator departIndicator);
    int updateDepart(Long fromDepartId, Long toDepartId, Long formsid, Long indicator, Integer fromyear, Integer toyear, Integer status);
    int updateDepartValue(DepartIndicator di);

    DepartIndicator findByCondition(Long departid, Long forms, Long indicator, Integer year, Integer status);

    Double getValueByCondition(Long departid, Long forms, Long indicator, Integer year, Integer status);

    int countInCondition(Long departid, Long forms, Long indicator, Integer year, Integer status);
    List<Long> listIndicatorsByCondition(List<Long> departIds, Long forms, List<Integer> years);
    List<ViewDepartIndicatorReport> listByCondition(List<Long> departIds, Long forms, List<Long> indicators, Integer year, Integer status, Page page);
    int countInCondition(List<Long> departIds, Long forms, List<Long> indicators, Integer year, Integer status);

}
